package config

import (
	"bytes"
	"compress/gzip"
	"fmt"
	"io"
	"strings"
)

func bindata_read(data []byte, name string) ([]byte, error) {
	gz, err := gzip.NewReader(bytes.NewBuffer(data))
	if err != nil {
		return nil, fmt.Errorf("Read %q: %v", name, err)
	}

	var buf bytes.Buffer
	_, err = io.Copy(&buf, gz)
	gz.Close()

	if err != nil {
		return nil, fmt.Errorf("Read %q: %v", name, err)
	}

	return buf.Bytes(), nil
}

var _resources_app_yaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x8f\x41\xaa\x13\x41\x10\x86\xf7\x7d\x8a\x82\x6c\x13\xa6\x27\x18\x19\x7a\xa7\x63\x22\x08\x51\xc1\x64\x25\x32\x74\x66\x2a\x33\xad\xdd\x5d\x43\x77\xb5\x93\x1c\x40\xc4\x85\x17\xf0\x08\x2e\xb2\x77\xe1\x6d\x14\x7d\xb7\x78\xcc\xf0\x1e\x79\x6f\x57\xfc\x5f\xf1\xd7\x57\x25\xf9\xa3\x69\x53\xd0\x6c\xc8\x2b\x01\xf0\xc2\x44\x7d\xb0\xf8\x56\x73\x57\x52\x08\x58\x4f\x00\x8e\xda\x46\x14\x00\x6b\x7f\x4f\xd7\xb1\xd6\x3d\x5e\xc9\xc6\x04\xdc\x22\x77\xd4\xbc\x26\x7e\x66\x2d\x0d\xd8\x5c\xe9\x5d\xed\x73\x6a\xce\x25\xf9\x98\x5c\x3f\xf6\xbe\xf1\x7b\xef\x74\x88\x9d\xb6\x0a\x38\xa4\x71\x73\x67\x1c\x6e\x28\x38\xcd\x0a\xb6\xe4\xe7\x20\x73\x78\xa5\x3d\x2c\xa5\x7c\x0a\xf9\x4a\xc9\x27\x4a\xae\xe0\xe5\x76\x27\x00\xca\x4e\x87\x88\xac\x60\xbf\xdb\x2c\x0a\x21\x66\xff\xbf\xfe\xfc\x7b\xf9\xf1\xe7\xd7\xb7\x9b\x2f\xdf\xff\xfd\xbe\x08\x1a\xa6\xa7\x22\xf6\x3a\x68\x7e\x60\xdb\x53\x60\x05\x45\x51\x14\x02\xc0\xb4\x9e\x02\x56\x29\xd8\xa8\xe0\x7d\xa6\xfb\x3e\x4b\x11\x43\x66\xa9\x35\x7e\x0e\x8f\x02\x4a\x3c\x9f\x82\x78\x8e\x8c\x2e\x33\xfe\x48\x1f\x04\xc0\xc7\x81\x2b\x36\x0e\x29\xb1\x82\x7c\x29\x61\xe6\x8c\x4f\x3c\xde\xb2\xd4\x56\x16\x3f\xa3\x55\xd0\xe0\x21\xb5\x93\x50\x1d\x46\xef\xd3\xe9\xb4\x78\x37\xcd\x02\x60\xc0\x43\xa4\xfa\x13\x72\xd5\x13\x59\x05\xb9\x94\x02\xa0\x21\xa7\x8d\x57\xa0\x6f\x03\x00\x00\xff\xff\x58\xf4\x49\x22\xab\x01\x00\x00")

func resources_app_yaml() ([]byte, error) {
	return bindata_read(
		_resources_app_yaml,
		"resources/app.yaml",
	)
}

var _resources_db_yaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x8e\xb1\x4a\x33\x41\x14\x46\xfb\x79\x8a\x0f\xfe\x3e\xec\xfe\xab\x49\xbc\x95\x60\x25\x08\x16\x79\x82\xd9\x9d\x6b\x76\x65\x92\x49\x66\x66\x13\x4d\x95\xc2\xc6\x46\x0b\x09\x82\x88\x58\x44\x82\xdd\x6a\x29\x82\x4f\xb3\x1b\x7d\x0b\xd9\x4d\x40\x6d\xcf\x3d\x7c\xe7\x5a\x56\x99\x23\x01\x48\xa5\x2c\x41\xf1\xa4\xd5\xa0\xd6\xa9\x9c\xc8\x30\x0c\x5a\x89\x19\x50\x3b\xea\xec\x09\x60\x24\x9d\x9b\x1a\xab\x08\x69\x22\x00\x15\x13\xc2\x1a\x1b\xa3\x7b\xd9\x8c\x09\x61\x10\x08\x21\x06\xe7\x6e\xac\xeb\x49\x95\x49\xcd\x89\x27\x34\x44\x00\xa9\x71\x7e\xd3\x50\xf1\xef\x40\x33\x62\x3d\x21\x8a\x82\xb6\x00\x72\xc7\x96\x30\xcb\x52\x69\xfe\x64\x1b\xb2\x1f\xfe\x8f\x76\x76\xdb\x9d\x6e\x5d\x90\x5e\xc6\xd2\xf1\x8f\x9c\xa4\xd2\x3a\xf6\x84\xdc\x9f\xd4\x86\x4b\xcd\xb4\x37\xd6\x04\x6f\x73\x16\x80\x36\xfd\x23\x9e\xb0\xae\xdf\x88\xf3\xbe\x00\x06\xf2\xec\x78\xc4\xc3\x03\x33\x1c\x3a\x42\x37\x08\xf0\x0f\xd5\xfd\xbc\x5c\xae\xaa\xcb\x9b\xf2\x7d\xfe\xf9\xf1\x50\x5d\x3d\x55\x8b\x62\xe3\x1e\x2a\xcd\x5b\x37\x6c\xdc\xed\xfd\xe5\x71\x7d\x77\xb1\x7e\x7e\xfb\xba\x7d\xad\x16\x45\xb9\x5c\x95\xc5\xb5\xf8\x0e\x00\x00\xff\xff\xcd\xce\xcb\xff\x5e\x01\x00\x00")

func resources_db_yaml() ([]byte, error) {
	return bindata_read(
		_resources_db_yaml,
		"resources/db.yaml",
	)
}

// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
	cannonicalName := strings.Replace(name, "\\", "/", -1)
	if f, ok := _bindata[cannonicalName]; ok {
		return f()
	}
	return nil, fmt.Errorf("Asset %s not found", name)
}

// AssetNames returns the names of the assets.
func AssetNames() []string {
	names := make([]string, 0, len(_bindata))
	for name := range _bindata {
		names = append(names, name)
	}
	return names
}

// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() ([]byte, error){
	"resources/app.yaml": resources_app_yaml,
	"resources/db.yaml":  resources_db_yaml,
}

// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
//     data/
//       foo.txt
//       img/
//         a.png
//         b.png
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
	node := _bintree
	if len(name) != 0 {
		cannonicalName := strings.Replace(name, "\\", "/", -1)
		pathList := strings.Split(cannonicalName, "/")
		for _, p := range pathList {
			node = node.Children[p]
			if node == nil {
				return nil, fmt.Errorf("Asset %s not found", name)
			}
		}
	}
	if node.Func != nil {
		return nil, fmt.Errorf("Asset %s not found", name)
	}
	rv := make([]string, 0, len(node.Children))
	for name := range node.Children {
		rv = append(rv, name)
	}
	return rv, nil
}

type _bintree_t struct {
	Func     func() ([]byte, error)
	Children map[string]*_bintree_t
}

var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
	"resources": &_bintree_t{nil, map[string]*_bintree_t{
		"app.yaml": &_bintree_t{resources_app_yaml, map[string]*_bintree_t{}},
		"db.yaml":  &_bintree_t{resources_db_yaml, map[string]*_bintree_t{}},
	}},
}}
